<div class="zs-body" data-ng-init="formInit('gistask', {
        keyField:'id',
        randomFields:['id'],
        orderObject:{publishDate:1}
    }) && loadData('gistask');setConHei();">
    <div class="zs-map-tool">
        <div class="location">
            <a href="javascript:;">首页</a> <i class="right-arr"></i>
            <a href="javascript:;">日常管理</a> <i class="right-arr"></i>
            <a href="javascript:;">任务管理</a>
        </div>
        <div class="option">
            <input type="button" class="zs-btn orange" value="新建" ng-click="addRow('gistask') && openWindow('edit');" />
            <input type="button" class="zs-btn orange" value="编辑" ng-click="editRow('gistask', gistask.sRows[0]) && openWindow('edit')" />
            <input type="button" class="zs-btn orange" value="删除 " ng-click="delEntitys('gistask')" />
        </div>
    </div>
    <div class="zs-content" style="position: unset">
        <div class="zs-nice-tab idTabs">
            <div class="link item" data-ng-init="iniTab('gistask', 'all', 'selected');">
                <a ng-click="setTab('gistask', 'all') && setQueryObject('gistask','taskState','null') && loadData('gistask')"
                    class="{{tabs['gistask'].tabClass['all']}}">全部</a>
                <a ng-click="setTab('gistask', '01') && setQueryObject('gistask','taskState','01') && loadData('gistask')"
                    class="{{tabs['gistask'].tabClass['01']}}">未开始</a>
                <a ng-click="setTab('gistask', '02') && setQueryObject('gistask','taskState','02') && loadData('gistask')"
                    class="{{tabs['gistask'].tabClass['02']}}">进行中</a>
                <a ng-click="setTab('gistask', '03') && setQueryObject('gistask','taskState','03') && loadData('gistask')"
                    class="{{tabs['gistask'].tabClass['03']}}">已完成</a>
            </div>
            <div class="tool item">
                <span class="search-warpper"> <i class="icon"></i> <input type="text" class="zs-input" placeholder="任务名称"
                        ng-model="gistask.queryObject['taskName']" />
                </span>
                <span class="search-warpper"> <i class="icon"></i> <input type="text" class="zs-input" placeholder="发布人"
                        ng-model="gistask.queryObject['publishUserName']" />
                </span>
            </div>
            <div class="operation item">
                <a class="ope-1" ng-click="loadData('gistask')"></a> <a class="ope-2"></a>
            </div>
            <div class="switch"></div>
        </div>
        <div class="date-container">
            <div id="zpgwd">
                <div class="zs-data-table">
                    <div class="container">
                        <table>
                            <thead>
                                <tr>
                                    <th><input id="allCheckbox" type="checkbox" ng-click="selectAll('gistask','allCheckbox');" /></th>
                                    <th>任务</th>
                                    <th>发布人/时间</th>
                                    <th>完成人/时间</th>
                                    <th>状态</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr ng-repeat="r in gistask.datas">
                                    <td><input type="checkbox" ng-click="selectRow('gistask',r);" ng-model="r.selected" /></td>
                                    <td>
                                        <a ng-click="editRow('gistask',r) && openWindow('edit');">
                                            <label ng-bind="r.taskName"></label><br />
                                            (<label ng-bind="r.taskTypeName"></label>-<label ng-bind="r.taskStateName"></label>)
                                        </a>
                                    </td>
                                    <td>
                                        <a ng-click="editRow('gistask',r) && openWindow('edit');"> 
                                            <label ng-bind="r.publishUserName"></label> / <label ng-bind="r.publishDate | asDate | date:'yyyy-MM-dd'"></label>
                                        </a>
                                    </td>
                                    <td>
                                        <a ng-click="editRow('gistask',r) && openWindow('edit');"> 
                                            <label ng-bind="r.completeUserName"></label> / <label ng-bind="r.planDate | asDate | date:'yyyy-MM-dd HH时'"></label>
                                        </a>
                                    </td>
                                    <td>
                                        <a ng-click="editRow('gistask',r) && openWindow('edit');"> 
                                            <label ng-bind="r.taskStateName"></label>
                                        </a>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                <div class="zs-pagination-box">
                    <ag-Page fn='gistask'></ag-Page>
                </div>
            </div>
        </div>

        <div ag-Window id="edit" title="任务管理" width='560px' height='390px'>
            <div class="zs-form-tab ibox">
                <form name="form" novalidate>
                    <table width="100%">
                        <tbody>
                            </tr>
                            <tr>
                                <td class="text" width="20%">任务名称</td>
                                <td colspan="3" class="left" width="80%">
                                    <input type="text" ng-model="gistask.editRow.taskName" class="zs-input" />
                                </td>
                            </tr>
                            <tr>
                                <td class="text" width="20%">任务内容</td>
                                <td colspan="3" class="left" width="80%">
                                    <textarea ng-model="gistask.editRow.taskContent" rows="12" cols="70"></textarea>
                                </td>
                            </tr>
                            <tr>
                                <td class="text" width="20%">任务类型</td>
                                <td class="left" width="30%">
                                    <ag-Combobox class="zs-input" style="width:175px;height:28px;" para="{uDictionary:true,dictionary:'g_task_type'}"
                                        ng-model="gistask.editRow.taskType" text-Value="gistask.editRow.taskTypeName" />
                                </td>
                                <td class="text" width="20%">任务状态</td>
                                <td class="left" width="30%">
                                    <ag-Combobox class="zs-input" style="width:175px;height:28px;" para="{uDictionary:true,dictionary:'g_task_state'}"
                                        ng-model="gistask.editRow.taskState" text-Value="gistask.editRow.taskStateName" />
                                </td>
                            </tr>
                            <tr>
                                <td class="text" width="20%">完成人</td>
                                <td class="left" width="30%">
                                    <input type="text" ng-model="gistask.editRow.completeUserName" class="zs-input" />
                                </td>
                                <td class="text" width="20%">计划完成时间</td>
                                <td class="left" width="30%">
                                    <ag-Datebox id='fi_planDate' editable='false' showcurday='true' class="zs-input"
                                        style="width:175px;height: 28px" ng-model="gistask.editRow.planDate"></ag-Datebox>
                                </td>
                            </tr>
                            <tr>
                                <td class="text" width="20%">发布人</td>
                                <td class="left" width="30%">
                                    <label ng-bind="gistask.editRow.publishUserName"></label>
                                <td class="text" width="20%">发布时间</td>
                                <td class="left" width="30%">
                                    <label ng-bind="gistask.editRow.publishDate | asDate"></label>
                                </td>
                            </tr>
                        </tbody>
                        <tfoot>
                            <tr>
                                <td colspan="4"><input type="button" name="ok" value="保存" class="zs-btn c-red" ng-click="formValidate(form) && save('gistask', gistask.editRow, saveCloseWindow)" />
                                    <input type="button" name="ok" value="取消" class="zs-btn c-green" ng-click="closeWindow('edit')" /></td>
                            </tr>
                        </tfoot>
                    </table>
                </form>
            </div>
        </div>
    </div>
</div>